<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>number-only-input</title>
</head>

<body>
    <label>
        纯数字输入框
        <input type="text" inputmode="numeric" pattern="[0-9]+"" />
      </label>
</body>
</html>